package com.andova.component.log;

import android.app.Application;

import androidx.annotation.NonNull;

/**
 * Created by Administrator on 2018-09-12.
 *
 * @author kzaxil
 * @since 0.0.2
 */
public class DarkLogComponent extends AndovaLogComponent {
    public static Logger Log;

    @Override
    public void i(Object msg) {
        Log.info(msg);
    }

    @Override
    public void i(Object msg, Throwable t) {
        Log.info(msg, t);
    }

    @Override
    public void d(Object msg) {
        Log.debug(msg);
    }

    @Override
    public void d(Object msg, Throwable t) {
        Log.debug(msg, t);
    }

    @Override
    public void w(Object msg) {
        Log.warn(msg);
    }

    @Override
    public void w(Object msg, Throwable t) {
        Log.warn(msg, t);
    }

    @Override
    public void e(Object msg) {
        Log.error(msg);
    }

    @Override
    public void e(Object msg, Throwable t) {
        Log.error(msg, t);
    }

    @Override
    public void t(Object msg) {
        Log.trace(msg);
    }

    @Override
    public void t(Object msg, Throwable t) {
        Log.trace(msg, t);
    }

    @Override
    public void v(Object msg) {
        Log.verbose(msg);
    }

    @Override
    public void v(Object msg, Throwable t) {
        Log.verbose(msg, t);
    }

    @Override
    protected void onCreate(@NonNull Application cxt) {
        Logger.Android.setApplication(cxt);
        Log = Logger.getLogger(cxt.getClass());
    }

    @Override
    protected void onLowMemory(@NonNull Application cxt) {

    }
}
